<template>
    <view class="message-list pd-v-24 pd-t-20 pd-b-40">
        <view class="pd-v-24 pd-h-32 bg-white border8 mr-b-12" v-for="(item,index) in list" :key="index+'ss'">
            <view class="font32 lh-44 bold color-default">
                {{item.title}}
            </view>
            <view class="mr-t-12 font24 lh-24 color-note">
               {{item.createTime}}
            </view>

            <view class="font24 lh-40 color-default mr-t-36">
                {{item.content}}
            </view>
            
            <!-- <view class="flex flex-wrap mr-t-16">
                <image v-for="(item,index) in 4" :key="index+'iiiiii'" class="flex-shrink mr-h-8 mr-r-16 bg-default" src="@/static/adv.png" style="width: 202rpx;height: 202rpx;" mode="aspectFit" />
                  
            </view> -->
              
              
              
        </view>
            
    </view>
</template>

<script setup>
import { useStore } from '@/store/index.js';
import { ref, reactive, onMounted, nextTick } from 'vue';
import { onLoad, onShow,onReachBottom } from '@dcloudio/uni-app';
import { notificationFormList } from '@/api/index/index.js'


const list = ref([]);
const total = ref(0);
const params = ref({
    pageSize:10,
    pageNum:1
})

onShow(() => {
    
})

onLoad(() => {
    getList()
})

onReachBottom(() => {
    if(list.value.length >= total.value) return
    params.value.pageNum++
    getList()
})

const getList = () => {
    notificationFormList(params.value).then(res => {
        console.log(res)
        if(res.code == 200){
            list.value = [...list.value,...res.rows]
            total.value = res.total
        }
    }).catch(err => {
        console.log(err)
    })
}





</script>

<style scoped lang="scss">
.message-list {
    background:#F7F7F7;
    min-height:100vh;

    
    
}
</style>
